package com.foreknow.demo3;

public class Swallow extends Bird{

    public  void fly(){
        System.out.println("fly......");
    }
    public static void main(String[] args) {
        Swallow swallow = new Swallow();
        swallow.setName("小明");
        swallow.setColor("黄色");
        swallow.eat();
        swallow.fly();
        Bird bird = new Bird();
        bird.setName("小红");
        bird.setColor("红色");
        bird.eat();
    }
}
